package com.sogou.qadev.service.login.client.user;

public class UserProxy implements com.sogou.qadev.service.login.client.user.User {
  private String _endpoint = null;
  private com.sogou.qadev.service.login.client.user.User user = null;
  
  public UserProxy() {
    _initUserProxy();
  }
  
  private void _initUserProxy() {
    try {
      user = (new com.sogou.qadev.service.login.client.user.UserServiceLocator()).getUser();
      if (user != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)user)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)user)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (user != null)
      ((javax.xml.rpc.Stub)user)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.sogou.qadev.service.login.client.user.User getUser() {
    if (user == null)
      _initUserProxy();
    return user;
  }
  
  public com.sogou.qadev.service.login.bean.User[] queryUsers(long keyId, long productId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (user == null)
      _initUserProxy();
    return user.queryUsers(keyId, productId, lines, pageNumber);
  }
  
  public boolean addProductAllEventUser(long keyId, long productId, long userId, int popedom) throws java.rmi.RemoteException{
    if (user == null)
      _initUserProxy();
    return user.addProductAllEventUser(keyId, productId, userId, popedom);
  }
  
  public boolean removeProductAllEventUser(long keyId, long productId, long userId, int popedom) throws java.rmi.RemoteException{
    if (user == null)
      _initUserProxy();
    return user.removeProductAllEventUser(keyId, productId, userId, popedom);
  }
  
  public boolean addProductAllDataUser(long keyId, long productId, long userId, int popedom) throws java.rmi.RemoteException{
    if (user == null)
      _initUserProxy();
    return user.addProductAllDataUser(keyId, productId, userId, popedom);
  }
  
  public boolean removeProductAllDataUser(long keyId, long productId, long userId, int popedom) throws java.rmi.RemoteException{
    if (user == null)
      _initUserProxy();
    return user.removeProductAllDataUser(keyId, productId, userId, popedom);
  }
  
  
}